package warmachineroster.grapheditor.actions;

import org.eclipse.gef.commands.Command;
import org.eclipse.gef.ui.actions.EditorPartAction;
import org.eclipse.ui.IEditorPart;

public class AddUnitAttachmentAction extends EditorPartAction {

	private static final String ADD_ATTACHMENT = "ADD_ATTACHMENT";
	private Command command;

	public AddUnitAttachmentAction(IEditorPart editor, Command command) {
		super(editor);
		this.command = command;
		setId(ADD_ATTACHMENT);
	}

	@Override
	protected boolean calculateEnabled() {
		return true;
	}

	@Override
	public void run() {
		execute(command);
	}

	
}
